"""
nacos连接器

"""
import os

import nacos
from dotenv import load_dotenv
from flask_cors import CORS

load_dotenv('env.ini', encoding='utf-8')

cors = CORS()
NACOS_URL = os.getenv('NACOS_URL')
SERVICE_NAME = os.getenv('SERVICE_NAME')
SERVICE_IP = os.getenv('SERVICE_IP')
SERVICE_PORT = os.getenv('SERVICE_PORT')
NAMESPACE = os.getenv('NAMESPACE')
WEIGHT = os.getenv('WEIGHT')
VERSION = os.getenv('SERVICE_VERSION', 'v1.0')
client = nacos.NacosClient(NACOS_URL, namespace=NAMESPACE,
                           # username=USERNAME, password=PASSWORD,
                           log_level="DEBUG")
